<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for Plugin.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file Plugin.php</h1>
<p>Documentation is available at <a href="../Dwoo/_Dwoo---Plugin.php.html">Plugin.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;base&nbsp;plugin&nbsp;class</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;you&nbsp;have&nbsp;to&nbsp;implement&nbsp;the&nbsp;&lt;em&gt;process()&lt;/em&gt;&nbsp;method,&nbsp;it&nbsp;will&nbsp;receive&nbsp;the&nbsp;parameters&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;are&nbsp;in&nbsp;the&nbsp;template&nbsp;code</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;software&nbsp;is&nbsp;provided&nbsp;'as-is',&nbsp;without&nbsp;any&nbsp;express&nbsp;or&nbsp;implied&nbsp;warranty.</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;In&nbsp;no&nbsp;event&nbsp;will&nbsp;the&nbsp;authors&nbsp;be&nbsp;held&nbsp;liable&nbsp;for&nbsp;any&nbsp;damages&nbsp;arising&nbsp;from&nbsp;the&nbsp;use&nbsp;of&nbsp;this&nbsp;software.</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jordi&nbsp;Boggiano&nbsp;&lt;j.boggiano@seld.be&gt;</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2008,&nbsp;Jordi&nbsp;Boggiano</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;http://dwoo.org/LICENSE&nbsp;&nbsp;&nbsp;Modified&nbsp;BSD&nbsp;License</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@link</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://dwoo.org/</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@version</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;1.0.0</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@date</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2008-10-23</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;Dwoo</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-key">abstract&nbsp;</span><span class="src-key">class&nbsp;</span><a href="../Dwoo/Dwoo_Plugin.html">Dwoo_Plugin</a></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a22"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;dwoo&nbsp;instance&nbsp;that&nbsp;runs&nbsp;this&nbsp;plugin</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc-type">Dwoo&nbsp;</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a27"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><a href="../Dwoo/Dwoo_Plugin.html#var$dwoo">$dwoo</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a28"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a29"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;constructor,&nbsp;if&nbsp;you&nbsp;override&nbsp;it,&nbsp;call&nbsp;parent::__construct($dwoo);&nbsp;or&nbsp;assign</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;dwoo&nbsp;instance&nbsp;yourself&nbsp;if&nbsp;you&nbsp;need&nbsp;it</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">Dwoo&nbsp;</span><span class="src-doc-var">$dwoo&nbsp;</span><span class="src-doc">the&nbsp;dwoo&nbsp;instance&nbsp;that&nbsp;runs&nbsp;this&nbsp;plugin</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a35"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Dwoo/Dwoo_Plugin.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-id">Dwoo&nbsp;</span><span class="src-var">$dwoo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Dwoo/Dwoo_Plugin.html#var$dwoo">dwoo</a>&nbsp;=&nbsp;<span class="src-var">$dwoo</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a38"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;plugins&nbsp;should&nbsp;always&nbsp;implement&nbsp;:</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;public&nbsp;function&nbsp;process($arg,&nbsp;$arg,&nbsp;...)</span></div></li>
<li><div class="src-line"><a name="a42"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;or&nbsp;for&nbsp;block&nbsp;plugins&nbsp;:</span></div></li>
<li><div class="src-line"><a name="a43"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;public&nbsp;function&nbsp;init($arg,&nbsp;$arg,&nbsp;...)</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;this&nbsp;could&nbsp;be&nbsp;enforced&nbsp;with&nbsp;:</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;abstract&nbsp;public&nbsp;function&nbsp;process(...);</span></div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;if&nbsp;my&nbsp;feature&nbsp;request&nbsp;gets&nbsp;enough&nbsp;interest&nbsp;one&nbsp;day</span></div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;see&nbsp;=&gt;&nbsp;http://bugs.php.net/bug.php?id=44043</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;utility&nbsp;function&nbsp;that&nbsp;converts&nbsp;an&nbsp;array&nbsp;of&nbsp;compiled&nbsp;parameters&nbsp;(or&nbsp;rest&nbsp;array)&nbsp;to&nbsp;a&nbsp;string&nbsp;of&nbsp;xml/html&nbsp;tag&nbsp;attributes</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;this&nbsp;is&nbsp;to&nbsp;be&nbsp;used&nbsp;in&nbsp;preProcessing&nbsp;or&nbsp;postProcessing&nbsp;functions,&nbsp;example&nbsp;:</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;$p&nbsp;=&nbsp;$compiler-&gt;getCompiledParams($params);</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;//&nbsp;get&nbsp;only&nbsp;the&nbsp;rest&nbsp;array&nbsp;as&nbsp;attributes</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;$attributes&nbsp;=&nbsp;Dwoo_Plugin::paramsToAttributes($p['*']);</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;//&nbsp;get&nbsp;all&nbsp;the&nbsp;parameters&nbsp;as&nbsp;attributes&nbsp;(if&nbsp;there&nbsp;is&nbsp;a&nbsp;rest&nbsp;array,&nbsp;it&nbsp;will&nbsp;be&nbsp;included)</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;$attributes&nbsp;=&nbsp;Dwoo_Plugin::paramsToAttributes($p);</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$params&nbsp;</span><span class="src-doc">an&nbsp;array&nbsp;of&nbsp;attributeName=&gt;value&nbsp;items&nbsp;that&nbsp;will&nbsp;be&nbsp;compiled&nbsp;to&nbsp;be&nbsp;ready&nbsp;for&nbsp;inclusion&nbsp;in&nbsp;a&nbsp;php&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a61"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$delim&nbsp;</span><span class="src-doc">the&nbsp;string&nbsp;delimiter&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;(defaults&nbsp;to&nbsp;')</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Dwoo/Dwoo_Plugin.html#methodparamsToAttributes">paramsToAttributes</a><span class="src-sym">(</span><span class="src-key">array&nbsp;</span><span class="src-var">$params</span><span class="src-sym">,&nbsp;</span><span class="src-var">$delim&nbsp;</span>=&nbsp;<span class="src-str">'\''</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$params</span><span class="src-sym">[</span><span class="src-str">'*'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$params&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_merge">array_merge</a><span class="src-sym">(</span><span class="src-var">$params</span><span class="src-sym">,&nbsp;</span><span class="src-var">$params</span><span class="src-sym">[</span><span class="src-str">'*'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$params</span><span class="src-sym">[</span><span class="src-str">'*'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$out&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$params&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$attr</span>=&gt;<span class="src-var">$val</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$out&nbsp;</span>.=&nbsp;<span class="src-str">'&nbsp;'</span>.<span class="src-var">$attr</span>.<span class="src-str">'='</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">trim</span><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&quot;\''</span><span class="src-sym">)</span>==<span class="src-str">''&nbsp;</span>||&nbsp;<span class="src-var">$val</span>==<span class="src-str">'null'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$out&nbsp;</span>.=&nbsp;<span class="src-id">str_replace</span><span class="src-sym">(</span><span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'\\'</span>.<span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&quot;&quot;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span>===&nbsp;<span class="src-var">$delim&nbsp;</span>&amp;&amp;&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span>-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span>===&nbsp;<span class="src-var">$delim</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$out&nbsp;</span>.=&nbsp;<a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'\\'</span>.<span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&quot;'</span>.<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span>-<span class="src-num">1</span><span class="src-sym">)</span>.<span class="src-str">'&quot;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$out&nbsp;</span>.=&nbsp;<a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'\\'</span>.<span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&quot;'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-var">$delim&nbsp;</span>.&nbsp;<span class="src-str">'.'</span>.<span class="src-var">$val</span>.<span class="src-str">'.'&nbsp;</span>.&nbsp;<span class="src-var">$delim&nbsp;</span>.&nbsp;<a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'\\'</span>.<span class="src-var">$delim</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&quot;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/ltrim">ltrim</a><span class="src-sym">(</span><span class="src-var">$out</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-sym">}</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Sun, 07 Feb 2010 17:53:53 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</body>
</html>